﻿using System;
using System.Reflection;
using System.Runtime.Serialization;

namespace YanZhiwei.DotNet2.Utilities.Base
{
    /// <summary>
    /// SerializationBinder重写
    /// </summary>
    public class UBinder : SerializationBinder
    {
        /// <summary>
        /// BindToType重写
        /// </summary>
        /// <param name="assemblyName">assemblyName</param>
        /// <param name="typeName">typeName</param>
        /// <returns>Type</returns>
        public override Type BindToType(string assemblyName, string typeName)
        {
            Assembly _ass = Assembly.GetExecutingAssembly();
            return _ass.GetType(typeName);
        }
    }
}
